<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8"/>
	<title>学校管理 - bjyadmin</title>
	<bootstrapcss />
    <style>

        .pages a,.pages span {
            display:inline-block;
            padding:2px 5px;
            margin:0 1px;
            border:1px solid #f0f0f0;
            -webkit-border-radius:3px;
            -moz-border-radius:3px;
            border-radius:3px;
        }
        .pages a,.pages li {
            display:inline-block;
            list-style: none;
            text-decoration:none; color:#58A0D3;
        }
        .pages a.first,.pages a.prev,.pages a.next,.pages a.end{
            margin:0;
        }
        .pages a:hover{
            border-color:#50A8E6;
        }
        .pages span.current{
            background:#50A8E6;
            color:#FFF;
            font-weight:700;
            border-color:#50A8E6;
        }
    </style>
</head>
<body>
<!-- 导航栏开始 -->
<div class="bjy-admin-nav">
	<a href="{:U('Admin/Index/index')}"><i class="fa fa-home"></i> 首页</a>
	&gt;
    学校管理
</div>
<!-- 导航栏结束 -->
<ul id="myTab" class="nav nav-tabs">
   <li class="active">
		 <a href="#home" data-toggle="tab">学校列表</a>
   </li>
   <li>
       <a href="{:U('Admin/School/add')}">添加基本信息</a>
	</li>
</ul>


<div id="myTabContent" class="tab-content">
   <div class="tab-pane fade in active" id="home">
		<table class="table table-striped table-bordered table-hover table-condensed">
			<tr>
				<th>学校名称</th>
				<th>学校校区</th>
				<th>学校类别</th>
                <th>学校关联</th>
                <th>操作</th>
			</tr>
			<foreach name="data" item="v">
				<tr>
					<td>{$v['schoolname']}</td>
					<td>{$v['rname']}</td>
                    <td><if condition="$v['schoolcate'] eq 1 ">小学<else/>中学</if></td>
                    <td>{$v['cou']}</td>
					<td>
						<a href="{:U('Admin/School/edit',array('sid'=>$v['sid']))}" >修改</a> |
						<a href="javascript:if(confirm('确定删除？'))location='{:U('Admin/School/delete',array('sid'=>$v['sid']))}'">删除</a>
					</td>
				</tr>
			</foreach>
		</table>
   </div>
    <!-- 列表分页开始 -->
    <div class="row">
        <div class="col-xs-12 col-md-12 col-lg-12 b-page pages text-left">
            {$page}
        </div>
    </div>
    <!-- 列表分页结束 -->
</div>


<bootstrapjs />
<script>
// 添加菜单
function add(){
	$("input[name='title'],input[name='name']").val('');
	$("input[name='pid']").val(0);
	$('#bjy-add').modal('show');
}

// 添加子菜单
function add_child(obj){
	var ruleId=$(obj).attr('ruleId');
	$("input[name='pid']").val(ruleId);
	$("input[name='title']").val('');
	$("input[name='name']").val('');
	$('#bjy-add').modal('show');
}

// 修改菜单
function edit(obj){
	var ruleId=$(obj).attr('ruleId');
	var ruletitle=$(obj).attr('ruletitle');
	var ruleName=$(obj).attr('ruleName');
	$("input[name='id']").val(ruleId);
	$("input[name='rname']").val(ruletitle);
	$("input[name='ralias']").val(ruleName);
	$('#bjy-edit').modal('show');
}
</script>
</body>
</html>
